﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ReAnimation.MVP.ViewInterfaces;
using System.Windows.Forms;

namespace ReAnimation.MVP.Views
{
    public class SaveFileDialogView: ISaveFileDialogView
    {
        #region ISaveFileDialogView Members

        public string Title { get; set; }
        public string FileName { get; set; }

        public void ShowModal()
        {
            ShowOpenFileDialog();
        }

        public bool ShowOpenFileDialog()
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();
            saveFileDialog.Title = Title;

            DialogResult diaglogResult = saveFileDialog.ShowDialog();

            FileName = saveFileDialog.FileName;

            return diaglogResult == DialogResult.OK;
        }

        #endregion

        #region IView Members

        public event EventHandler ViewClosed;

        public void Show()
        {
            
        }

        public void Hide()
        {
            
        }

        public void Close()
        {
            
        }

        public void SuspendLayout()
        {
            
        }

        public void ResumeLayout()
        {
            
        }

        #endregion
    }
}
